package com.moif.ttakji.game;

import java.util.ArrayList;
import java.util.List;

import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.ListView;
import android.widget.Toast;

public class TtakjiSelectActivity extends Activity {
	
	ListView list;
	
	MyAdapter mAdapter;
	List<MyData> items = new ArrayList<MyData>();
	
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.ttakjiselect);
		list = (ListView)findViewById(R.id.listView1);
		initData();
		mAdapter = new MyAdapter(this, items);
		mAdapter.setOnAdapterItemImageClickListener(new MyAdapter.OnAdapterItemImageClickListener() {
			
			@Override
			public void onAdapterItemIamgeClick(MyData data) {
				// TODO Auto-generated method stub
				Toast.makeText(TtakjiSelectActivity.this, "mydata title : "+data.title, Toast.LENGTH_SHORT).show();
			}
		});//�������̽� implements 
		list.setAdapter(mAdapter);
		Button btn = (Button)findViewById(R.id.button1);
		btn.setOnClickListener(new View.OnClickListener() {
			
			@Override
			public void onClick(View v) {
				// TODO Auto-generated method stub
				//인텐트
			}
		});
	}
	
	private void initData(){
		items.add(new MyData(1,"보통 딱지","공격력","방어력"));
		items.add(new MyData(2,"물 딱지","공격력","방어력"));
		items.add(new MyData(3,"왕 딱지","공격력","방어력"));
		items.add(new MyData(4,"테이프 딱지","공격력","방어력"));
		items.add(new MyData(5,"슈퍼 딱지","공격력","방어력"));
		items.add(new MyData(6,"미니 딱지","공격력","방어력"));
		items.add(new MyData(7,"신문지 딱지","공격력","방어력"));
		items.add(new MyData(8,"박스 딱지","공격력","방어력"));		
	}
}
